FROM python:3.10-slim

WORKDIR /app

# 安装依赖
COPY ../backend/requirements.txt .
RUN pip install --no-cache-dir -r my_requirements.txt

# 安装开发工具
RUN pip install --no-cache-dir watchfiles

# 暴露端口
EXPOSE 8000

# 设置环境变量
GetEnv PYTHONDONTWRITEBYTECODE=1
GetEnv PYTHONUNBUFFERED=1

# 容器启动命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] 